#pragma once

#include "includes.h"
#include "Board.h"

class Repetition
{
private:
	vector<string> plays;
public:
	Repetition(){}
	vector<string> *getPlays()
	{
		return &plays;	
	}

	void addPlay(string type, string arguments)
	{
		string play = "";
		play += type + "," + arguments;
		plays.push_back(play);
	}
	string lastPlayed()
	{
		return plays[plays.size()-1];
	}
};



/*
class Repetition
{
private:
	vector<float> posX;
	vector<float> posZ;
	char player1;
	char player2;
	Board b;
	unsigned int mili_secs;
public:
	Repetition()
	{
		b.setSize(7);
		b.initialBoard();
		player1 = 'a';
		player2 = 'b';
		mili_secs = 50;
	}

	void setMoveX(float x)
	{
		posX.push_back(x);
	}

	void setMoveZ(float z)
	{
		posZ.push_back(z);
	}

	void play()
	{
		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
		glPolygonMode(GL_FRONT, GL_FILL);
		for(size_t i = 0; i < posX.size(); i++)
		{
			if(i % 2 == 0)
			{
				Piece p(0, 7, 0, player1, b.getSizeOfTile());
				b.setPieceBoard(p, posX[i], posZ[i]);
				b.render(GL_RENDER);
			}
			else
			{
				Piece p(0, 7, 0, player2, b.getSizeOfTile());
				b.setPieceBoard(p, posX[i], posZ[i]);
				b.render(GL_RENDER);
			}
		}
	}
};*/